package com.itheima.mapper;

import com.itheima.pojo.Brand;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.util.List;

public interface Btrandmapper {
    @Select("select * from Brand")
    List<Brand> findall();
    @Delete("delete from Brand where id=#{id}")
    int deleteById(int id);

    @Update("update Brand set name=#{name},id=#{id},hobby=#{hobby} where id=#{id}")
    void updateUser(Brand brand);

    @Insert("insert into Brand values(#{id},#{name},#{hobby})")
    int add(Brand brand);
}
